Clamps Dictionary
svg-lines->cm
Function
(svg-lines->cm svg-lines &key (x-offset 0) (x-scale 1) end colormap)
Convert a list of svg-lines parsed from an svg document into Common
Music instances according to the :type
property of the :attributes
property. The coordinates, color and opacity of the lines are
prepended to the attributes argument list and delegated to the
function stored in *svg-fn-assoc* for the type of object. If no
attributes list is given, lines will be handled as a MIDI note event.
Arguments
svg-lines |
A list of property lists parsed from the svg-file. |
x-offset |
Number denoting an x-offset to add to each line. |
xscale |
Number denoting a scaling factor to apply to each line. |
end |
Number denoting an optional end (default is all lines). |
colormap |
A hash table to map colors of the svg-lines to channels. |
Example
(svg-lines->cm '((:x1 307.5 :y1 53.5 :x2 331.5 :y2 53.5 :color "#00ff02" :opacity 0.4 :attributes (:type cm:sfz :preset :flute-nv :oneshot nil :pan 0.5 :startpos 0 :chan 100) ) (:x1 290.5 :y1 66 :x2 316.5 :y2 66 :color "#aa4403" :opacity 0.42 :attributes (:type cm:sfz :preset :vc-nonvib-mf-4c :oneshot nil :pan 0.5 :startpos 0 :chan 100) )))